// Decompiled on 周六 2月 22 19:31:49 CST 2025 with Zomboid Decompiler v0.1.3 using Vineflower.
package zombie.audio.parameters;

import zombie.audio.FMODLocalParameter;
import zombie.characters.IsoZombie;
import zombie.core.math.PZMath;

public final class ParameterPlayerDistance extends FMODLocalParameter {
    private final IsoZombie zombie;

    public ParameterPlayerDistance(IsoZombie _zombie) {
        super("PlayerDistance");
        this.zombie = _zombie;
    }

    @Override
    public float calculateCurrentValue() {
        return this.zombie.target == null ? 1000.0F : (float)((int)PZMath.ceil(this.zombie.DistToProper(this.zombie.target)));
    }
}
